// Created by wangliang on 2025/6/19.

import 'package:json_annotation/json_annotation.dart';

part 'user_info.g.dart';

@JsonSerializable()
class UserInfo {
  @JsonKey(defaultValue: 0)
  int id;
  @JsonKey(defaultValue: "")
  String nickname;
  @JsonKey(defaultValue: '')
  String avatar;
  @JsonKey(defaultValue: '')
  String phone;

  UserInfo({required this.id, required this.nickname, required this.avatar, required this.phone});
  factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);
  Map<String, dynamic> toJson() => _$UserInfoToJson(this);
}
